//create by Jarven.wei
	var callbackFunction;
	var submitFormId;
	if(document.addEventListener){//如果是Firefox 
		document.addEventListener("keypress",fireFoxHandler, true); 
	}else{ 
		document.attachEvent("onkeypress",ieHandler); 
	} 
	
	function fireFoxHandler(evt){ 
	//alert("firefox"); 
	if(evt.keyCode==13 && evt.target.type !='button'){ 
		if(callbackFunction) {
			callbackFunction();
		}else{
			document.getElementById(submitFormId).submit();
		}
	} 
	} 
	
	function ieHandler(evt){ 
	//alert("IE"); 
		if(evt.keyCode==13 && evt.srcElement.type !='button'){ 
			if(callbackFunction) {
				callbackFunction();
			}else{
				document.getElementById(submitFormId).submit();
			}
		} 
	} 

//回调函数的enter提交
function callbackEnter(callback){
	callbackFunction = callback;
}

//直接form提交
function formIdEnter(formId){
	submitFormId = formId;
}